﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IInterface;

namespace Hello
{
    public class SayHello:ISayHello
    {
        private IHelloGenerator _helloGen;
        public IHelloGenerator HelloGenerator
        {
            get { return _helloGen; }
            set { _helloGen = value; }
        }

        public void SayHelloTo(string name)
        {
            if (_helloGen != null)
                Console.WriteLine(_helloGen.GetHelloString(name));
            else
                Console.WriteLine("Client.hello is not initialized");
        }
    }
}
